


<% var pageLevelJS = { %> 
<link rel="stylesheet" href="${plugin}/tool/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script  type="text/javascript" src="${plugin}/tool/zTree/js/jquery.ztree.core.min.js"></script>
<script  type="text/javascript" src="${plugin}/tool/zTree/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript" src="${plugin}/tool/zTree/js/jquery.ztree.exedit.min.js"></script>
<script type="text/javascript">
var settings = {
		 modelDomainFlag:"sys"
		,modelName:"组织机构"
		,modelFlag:"org"
		,canUpdate:${shiro.hasPermission('sys_org:update:*')}
		,canDelete:${shiro.hasPermission('sys_org:delete:*')}
		,canRemove:${shiro.hasPermission('sys_org:remove:*')}
		,canAdd:${shiro.hasPermission('sys_org:add:*')}
		,canDetail:${shiro.hasPermission('sys_org:detail:*')}
		}
</script> 
<script type="text/javascript" src="${ctx}/static/fw/js/fw-tree.js"></script>
<script type="text/javascript" src="${ctx}/static/js/sys/org/index.js"></script>
<%};%> 
<% var form = { %>
<form id="searchForm" action="${ctx}/sys/org/query?_style=bs&noPage=true&${session._para}" class="form-inline" role="form">
				  <%if(has(sysFlags) && sysFlags.~size>1){ %>
					   <div class="form-group  ">
					     <label for="categoryCode">所属系统:</label>
						 <select placeholder="类别" name="instanceId" class="form-control">
						    <option value="">--系统--</option>
							<% for(res in sysFlags!){ %>
							  <option value="${res.id}">${res.nameStr}</option>
						　　   <% } %>
						</select>
					  </div>
				   <%}else{%>
				       <input type="hidden"  name="instanceId" value="${sys_flag}">
				    <% } %>
				  <div class="form-group">
				     <label for="name">组织机构名:</label>
				     <input type="text" class="validate[maxSize[50]] form-control" name="name" placeholder="组织机构名">
				  </div>
				    <div class="form-group">
				     <label for="name">组织编号:</label>
				     <input type="text" class="validate[maxSize[50]] form-control" name="num" placeholder="编号">
				  </div>
				  <div class="form-group" >
				       <label for="validClass">有效区分:</label>
				 	   <div class="form-control" id="validClass"> 
					       <label class="">
					         <input type="radio" name="validClass" class="toggle" value="1">有效
					       </label>
					       <label class="">
					         <input type="radio" name="validClass" class="toggle" value="0">无效
					       </label>
					       <label class="">
					         <input type="radio" name="validClass" checked="checked" class="toggle" value="">全部
					       </label>
				       </div>
				</div>
				  <div class="form-group"  >
				       <label for="validClass">删除区分:</label>
				 	   <div class="form-control" id="deleteClass"> 
					       <label class="">
					         <input type="radio" name="deleteClass" class="toggle" value="1">已删除
					       </label>
					       <label class="">
					         <input type="radio" name="deleteClass" class="toggle" value="0">未删除
					       </label>
					       <label class="">
					         <input type="radio" name="deleteClass" checked="checked" class="toggle" value="">全部
					       </label>
				       </div>
				</div>
				
			</form>
<%};%> 

<% var toolbar = { %>
<%if(shiro.hasPermission('sys_org:add:*')) {%>
  				<button type="button" class="btn btn-primary btn-xs addBtn" title="新增" data-toggle="modal" data-target="#myModal">
  					<i class="ace-icon fa  fa-plus bigger-120"></i>新增 
  				</button> 
  				<%}%>
  				<%if(shiro.hasPermission('sys_org:remove:*')||shiro.hasPermission('sys_org:update:*')) {%>
  				<button type="button" class="btn btn-warning btn-xs removeBtn" title="将数据标识为删除状态">
  					<i class="ace-icon fa fa-trash-o bigger-120"></i>逻辑删除
  				</button> 
  				<%}%>
  				<%if(shiro.hasPermission('sys_org:delete:*')) {%>
  				<button type="button" class="btn btn-danger btn-xs delBtn" title="物理删除数据">
  					<i class="ace-icon fa fa-trash-o bigger-120"></i>删除
  				</button> 
  				<%}%>
  				<div class="pull-right">
	  			    <button type="button" class="btn btn-info btn-xs tableBtn" title="控制非核心列">
						<i class="ace-icon fa bigger-120">隐藏</i>
					</button>
				</div>
<%};%> 

<% var ths = { %>
              <th w_render="checkboxFunc" w_class="center" w_index="id" width="50px"><input type="checkbox"/></th>
               <th w_num="total_line" w_class="center hidden-480" width="50px">序号</th>
	        <th w_index="name" w_tip="true" >组织机构名</th>
	        <th w_index="parent.name" w_class="hidden-480" w_tip="true" >上级组织</th>
          <%if(has(sysFlags) && sysFlags.~size>1){ %>
	      <th w_index="instance.nameStr" w_class="hidden-480">所属系统</th>
	      <%}%>
	        <th w_render="validClassFunc" w_class="hidden-480"  w_index="validClass" width="120px">有效区分</th>
	        <th w_render="removeClassFunc" w_class="hidden-480"  w_index="deleteClass" width="120px">删除区分</th>
	        <th w_render="operateFunc" class="nodata width-480-ctr" w_index="id" w="120px" width="120px">操作</th>

<%};%> 
<% var left = { %>
<form action="" id="treeForm" class="form-horizontal treeForm" role="form">
			<input type="hidden" name="id">
			 <div class="zTreeDemoBackground left" id="treeDiv" style="overflow: auto;">
				<ul id="treeFormztree" class="ztree"></ul>
			</div>
		</form>
<%};%> 
<% var layoutParas =
{"left":left,"leftClass":"col-sm-2","rightClass":"col-sm-10","title":"",table:"searchTable",tableClass:"","ths":ths,"toolbar":toolbar,"form":form,"pageLevelJS":pageLevelJS};
layout("/WEB-INF/views/btl/template/backBasicGridComplexTemplate.html", layoutParas){ %>
	
<%} %>
